package cn.com.xjnt.vas.ordering.domain.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * The persistent class for the ordering_discount_info database table.
 * 
 */
@Entity
@Table(name = "ordering_discount_info")
@NamedQuery(name = "DiscountInfo.findAll", query = "SELECT d FROM DiscountInfo d")
public class DiscountInfo extends com.frameworks.core.entity.IdEntity {
    private static final long serialVersionUID = 1L;

    private String code;

    private float discount;

    private String name;

    // bi-directional many-to-one association to FoodOrder
    @ManyToOne
    @JoinColumn(name = "food_order_id")
    private FoodOrder foodOrder;

    public DiscountInfo() {
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public float getDiscount() {
        return this.discount;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public FoodOrder getFoodOrder() {
        return this.foodOrder;
    }

    public void setFoodOrder(FoodOrder foodOrder) {
        this.foodOrder = foodOrder;
    }
}